package com.maslyk.invitation;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.myfaces.webapp.StartupServletContextListener;

/**
 * @author kris
 */
public class StartupListener extends StartupServletContextListener implements ServletContextListener
{
    public void contextDestroyed(ServletContextEvent event)
    {
    	super.contextDestroyed(event);
//        DataCache.getInstance().clearCache();
        System.out.println("Invitation zatrzymana!");
    }

    public void contextInitialized(ServletContextEvent event)
    {
        super.contextInitialized(event);
    	initializeAppData();
        System.out.println("Invitation uruchomiona!");
    }

    public void initializeAppData()
    {
        handleTextList();
    }

    private void handleTextList()
    {
//        List<Text> texts = null;
//        DataCache.getInstance().getCache().put(LocalNames.TEXT_LIST, texts);
    }
    
}
